package main
import "fmt"
func m() func(x int) int {
	//形成闭包
	n := 10
	return func(x int) int {
		n += x
		return n
	}
}
func main() {
	f := m()
	fmt.Println(f(2))
	fmt.Println(f(2))
	fmt.Println(f(2))
}
